package dominion.kingdom;

import dominion.CardTypes;
import dominion.Dominion;
import dominion.Player;
import dominion.Victory;

public class Witch extends AbstractAttackAction {

	@Override
	public void execute(Dominion dominion) {
		Player player = dominion.current();
		for (int i = 0; i < 2; i++) {
			player.draw(dominion);
		}
		for (Player p : dominion.waitings()) {
			if (hasMoat(p) == false) {
				p.gain(Victory.CURSE);
			}
		}
	}

	@Override
	public CardTypes getType() {
		return CardTypes.Witch;
	}

	@Override
	public String toString() {
		return getType().toString();
	}
}
